package com.situ.util.service.impl;
import java.util.List;
import java.util.Map;

import com.situ.login.entity.SysUser;
import com.situ.util.entity.*;
import org.apache.ibatis.annotations.Param;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;


import com.situ.util.service.CstCustomerService;
import com.situ.util.dao.CstCustomerDao;

/**
 * CstCustomer的服务接口的实现类
 * 
 * @author 胡文 qq:986776
 *
 */
@Service
public class CstCustomerServiceImpl implements CstCustomerService {
	private final Logger LOG = LogManager.getLogger(this.getClass());

	@Autowired
	private CstCustomerDao cstCustomerDao;
	//根据条件查询客户表
	public List<Map> queryallCustomer(CstCustomer cst){

		return cstCustomerDao.queryallCustomer(cst);
	}
	//根据id查询客户表
	public CstCustomer showCustById( String cust_no){
		return cstCustomerDao.showCustById(cust_no);
	}

	public List<BasDict>  querydict(String dict_type){
		return cstCustomerDao.querydict(dict_type);
	}

	public Integer querylevelid(String dict_item){
		return cstCustomerDao.querylevelid(dict_item);
	}
	public Integer queryuseridbyname( String usr_name){
return cstCustomerDao.queryuseridbyname(usr_name);
	}
	public List<SysUser> queryusers(){
return cstCustomerDao.queryusers();
	}
	public void updateCustomerById(CstCustomer c){
		cstCustomerDao.updateCustomerById(c);
	}
	public List<CstLinkman> queryLinkmanById(String lkm_cust_no){
       return cstCustomerDao.queryLinkmanById(lkm_cust_no);
	}
	public void addlinkman(CstLinkman c){
		cstCustomerDao.addlinkman(c);
	}
	public void updatelinkman(CstLinkman c){
		cstCustomerDao.updatelinkman(c);
	}
	public void dellinkman( Integer lkm_id){
		cstCustomerDao.dellinkman(lkm_id);
	}

	public List<CstActivity> queryatvById(String cust_no){
		return cstCustomerDao.queryatvById(cust_no);
	}
	public void addatv(CstActivity a){
		cstCustomerDao.addatv(a);
	}
	public void updateatv(CstActivity c){cstCustomerDao.updateatv(c);}
	public void delatv( Integer id){cstCustomerDao.delatv(id);}
	public CstActivity queryatvByaId(Integer atv_id){
		return cstCustomerDao.queryatvByaId(atv_id);
	}
	public List<Orders> queryorders(String odr_customer_id){
		return cstCustomerDao.queryorders(odr_customer_id);
	}
	public void delcustomer(@Param("cust_no") String cust_no){
		 cstCustomerDao.delcustomer(cust_no);
	}

	public Map queryorderbyid( Integer odr_id) {
		return cstCustomerDao.queryorderbyid(odr_id);
	}
	public List<Map> queryPLByid( Integer odd_order_id){
		return cstCustomerDao.queryPLByid(odd_order_id);
	}

}